package com.github.pagehelper.filter.entity;

public class ArrayCondition extends AbstractCondition{

    public ArrayCondition(String key, Object val) {
        super();
        this.setName(key);
        this.toList(val);
    }

    private Object[] value;

    public Object[] getValue() {
        return value;
    }

    public void setValue(Object[] value) {
        this.value = value;
    }

    private void toList(Object val) {
        this.value = val.toString()
                .replace("[","")
                .replace("]","")
                .replace("\"","")
                .split(",");
    }
}
